﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <title>研学活动列表</title>
    <link rel="stylesheet" type="text/css" href="css/public.css"/>
    <link rel="stylesheet" type="text/css" href="css/jquery.bxslider.css"/>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <script type="text/javascript" src="js/jquery1.11.3.min.js"></script>
    <script type="text/javascript" src="js/jquery.bxslider.min.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
    <script type="text/javascript" src="js/research.js"></script>
</head>
<body>
<!--top-->
<div class="top" id="top">
    <div class="wrap clearfloat">
        <div class="logo"><a href="index.html"><img src="images/logo.png"/></a></div>
        <div class="nav">
            <ul class="clearfloat">
                <li>
                    <h2><a href="index.html">首页</a></h2>
                </li>
                <li>
                    <h2><a href="about.html">关于我们</a><span class="navBtn"></span></h2>
                    <div class="navDown">
                        <a href="">校训与理念</a>
                        <a href="">校长寄语</a>
                        <a href="">常见问题</a>
                        <a href="">在线视频</a>
                    </div>
                </li>
                <li class="active">
                    <h2><a href="course_list.html">课程设置</a><span class="navBtn"></span></h2>
                    <div class="navDown">
                        <a href="">校训与理念</a>
                        <a href="">校长寄语</a>
                        <a href="">在线视频</a>
                    </div>
                </li>
                <li>
                    <h2><a href="picture_list.html">学生天地</a><span class="navBtn"></span></h2>
                    <div class="navDown">
                        <a href="">校训与理念</a>
                        <a href="">常见问题</a>
                    </div>
                </li>
                <li>
                    <h2><a href="news_list.html">校园动态</a><span class="navBtn"></span></h2>
                    <div class="navDown">
                        <a href="">校训与理念</a>
                        <a href="">校长寄语</a>
                        <a href="">校长寄语</a>
                        <a href="">校长寄语</a>
                        <a href="">常见问题</a>
                        <a href="">在线视频</a>
                    </div>
                </li>
                <li>
                    <h2><a href="">家校共育</a><span class="navBtn"></span></h2>
                    <div class="navDown">
                        <a href="">校训与理念</a>
                        <a href="">校长寄语</a>
                        <a href="">常见问题</a>
                        <a href="">常见问题</a>
                        <a href="">在线视频</a>
                    </div>
                </li>
                <li>
                    <h2><a href="">入学</a><span class="navBtn"></span></h2>
                    <div class="navDown">
                        <a href="">校训与理念</a>
                        <a href="">校长寄语</a>
                        <a href="">校长寄语</a>
                        <a href="">校长寄语</a>
                        <a href="">常见问题</a>
                        <a href="">在线视频</a>
                    </div>
                </li>
                <li>
                    <h2><a href="">加入我们</a><span class="navBtn"></span></h2>
                    <div class="navDown">
                        <a href="">常见问题</a>
                        <a href="">在线视频</a>
                    </div>
                </li>
            </ul>
        </div>

        <div class="topRight clearfloat">
            <div class="topLang">
                <span class="topLangBtn"></span>
                <a class="topLangEn" href="">English</a>
                <a class="topLangCh" href="">China</a>
            </div>
            <div class="topSearch">
                <span class="topSearchBtn"></span>
                <div class="topSearchWrap clearfloat">
                    <input type="text" name="" id="" value="请输入检索内容" placeholder=""/>
                    <button></button>
                </div>
            </div>
        </div>

    </div>
    <div class="muen">
        <span class="muenX"></span>
        <span class="muenY"></span>
        <span class="muenZ"></span>
    </div>
</div>
<!--top-->

<!--banner-->
<div class="bannerCont bannerContCourse"></div>
<!--/banner-->

<div class="main">
    <div class="wrap clearfloat">
        <div class="contLeft">
            <div class="contLeftTit">
                <span><img src="images/course_ico.png"/></span>
                <h2>研学活动</h2>
                <h3>research activities</h3>
            </div>
            <div class="contLeftNav">
                <ul>
                    <li >
                        <h3><a href="javascript:;">研学活动列表<span class="contLeftBtn"></span></a></h3>
                        <div class="contLeftDown">
                            <!--                            <a href="javascript:;">海洋课程</a>-->
                            <!--                            <a href="javascript:;">海洋课程</a>-->
                            <!--                            <a href="javascript:;">海洋课程</a>-->
                            <!--                            <a href="javascript:;">海洋课程</a>-->
                        </div>
                    </li>

                </ul>
            </div>

        </div>
        <div class="contRight">
            <div class="contRightH clearfloat">
                <h2>研学活动</h2>
                <p>您的位置：<a href="">首页</a> &gt; <a href="">研学活动</a> &gt; <span>研学活动列表</span></p>
            </div>
            <div class="contRightLine"></div>

            <div class="contRightWrap">
                <ul class="courseList">
                </ul>

                <div class="page">
                    <em>首页</em><i>上一页</i>
                    <a class="active" href="javascript:">1</a>
                    <a href="javascript:">2</a>
                    <a href="javascript:">3</a>
                    <a href="javascript:">4</a>
                    <a href="javascript:">5</a>
                    <a href="javascript:">6</a>
                    <i>下一页</i><em>尾页</em>
                </div>

            </div>


        </div>

    </div>
</div>

<div id="footer">
    <div class="wrap clearfloat">
        <div class="footerLeft">
            <div class="footerlogo"><img src="images/logo_footer.png"/></div>
            <div class="footerEwm">
                <img src="images/ewm.png"/>
                <p>扫一扫<br/>关注微信号</p>
            </div>
        </div>
        <div class="footerRight">
            <ul class="clearfloat">
                <li>
                    <h3>关于我们</h3>
                    <p><a href="">课程特色</a></p>
                    <p><a href="">寄宿</a></p>
                    <p><a href="">服务</a></p>
                    <p><a href="">梅沙教育</a></p>
                </li>
                <li>
                    <h3>学校新闻</h3>
                    <p><a href="">课程特色</a></p>
                    <p><a href="">寄宿</a></p>
                    <p><a href="">服务</a></p>
                </li>
                <li>
                    <h3>课程设置</h3>
                    <p><a href="">课程特色</a></p>
                    <p><a href="">寄宿</a></p>
                    <p><a href="">服务</a></p>
                    <p><a href="">梅沙教育</a></p>
                </li>
                <li>
                    <h3>我们的团队</h3>
                    <p><a href="">课程特色</a></p>
                    <p><a href="">寄宿</a></p>
                    <p><a href="">服务</a></p>
                    <p><a href="">梅沙教育</a></p>
                </li>
                <li>
                    <h3>招生信息</h3>
                    <p><a href="">课程特色</a></p>
                    <p><a href="">寄宿</a></p>
                    <p><a href="">服务</a></p>
                    <p><a href="">梅沙教育</a></p>
                </li>
                <li>
                    <h3>联系我们</h3>
                    <p><a href="">课程特色</a></p>
                    <p><a href="">寄宿</a></p>
                    <p><a href="">服务</a></p>
                    <p><a href="">友情链接</a></p>
                </li>
            </ul>
            <div class="footerInfor clearfloat">
                <div class="footerInforL">
                    <p>地址： 南京市建邺区雨润大街10号</p>
                    <p>邮箱：jiaoyu@support.com</p>
                </div>
                <div class="footerInforR">
                    <p><span>邮编：510630</span> <span>电话：(025)57688087</span></p>
                    <p>工作时间：周一至周五 9:00-12:00；14:00-17:30</p>
                </div>

            </div>
        </div>
    </div>
</div>
<div id="bottom">
    <div class="wrap">
        <p>Copyright© 2016-2018 Meisha Technology. All Rights <a href="http://www.bootstrapmb.com/" title="bootstrapmb">Reserved</a>.
            深圳青少年教育科技有限公司 版权所有 备案/许可证编号为：粤ICP备16232454号</p>
    </div>
</div>

</body>

<script type="text/javascript">
    var page = 1;
    var limit = 5;
    $(function () {
        //加载左侧菜单
        $.ajax({
            url: '/admin/actityType?opr=list',
            type: 'get',
            dataType: 'json',
            success: function (result) {
                console.log(result)
                //拼接菜单
                var menu = '';
                $.each(result, function (k, v) {
                    menu += '<a href="javascript:;">' + result[k].name + '</a>'
                })

                $("div.contLeftDown").html(menu);
            }
        })
        //加载列表
        pageQuery(1,'');

    });

    //点击事件调用翻页
    $("div.page em").click(function () {
        //首页
        pageQuery(1, '');

    })


    var pageQuery = function (currentPage, type) {
        $.ajax({
            url: '/research?opr=list&page=' + currentPage + '&limit=' + limit + '&type=' + type,
            type: 'get',
            dataType: 'json',
            success: function (result) {
                if (result.code === 2000) {
                    //拼接页面
                    var html = '';
                    let data = result.data;
                    $.each(data, function (k, v) {
                        html += '<li class="clearfloat">'
                        html += '<div class="pic"><a href="research_detial.html?id="' + data[k].id + '>'
                        html += '<img alt="" src="' + data[k].imgUrl + '"/>'
                        html += '</a></div>'
                        html += '<div class="cont">'
                        html += '<h3 class="single-line"><a href="research_detial.html?id="' + data[k].id + '>' + data[k].title
                        html += '</a></h3>'
                        html += '<p>' + data[k].detail + '</p>'
                        html += '</div>'
                        html += '</li>'
                    });
                    $("ul.courseList").html(html);

                    //处理页码
                    var page = '<em>首页</em><i>上一页</i>';
                    var total = result.total;
                    var i = 0;
                    while (i < total) {
                        i++;
                        if (i === 1) {
                            page += '<a class="active" href="javascript:">1</a>';
                        }
                        if (i < 10) {
                            page += '<a href="javascript:">' + i + '</a>';
                        } else {
                            page += "..."
                            break
                        }
                    }
                    page += '<i>下一页</i><em>尾页</em>'
                    $("div.page").html(page);
                }
            }
        })
    }


</script>

</html>
